﻿<UserControl x:Class="ine.Views.ResourceListControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:ine.Views"
             mc:Ignorable="d" d:DesignHeight="400" d:DesignWidth="700">
    <Grid Margin="5,5,5,2">
        <Grid Height="30" VerticalAlignment="Top">
            <TextBlock VerticalAlignment="Center" Text="The following files will be downloaded, just schedule them"/>
        </Grid>
        <StackPanel Height="30" Orientation="Horizontal"
                    VerticalAlignment="Bottom" HorizontalAlignment="Left">
            <Button Content="Back" Width="100" Click="HandleBack"/>
        </StackPanel>
        <StackPanel Height="30" Orientation="Horizontal"
                    VerticalAlignment="Bottom" HorizontalAlignment="Right">
            <Button Content="Schedule" Width="100" Click="HandleSchedule"/>
        </StackPanel>
        <ListView Margin="0,35,0,35" ItemsSource="{Binding Path=Resources}">
            <ListView.View>
                <GridView AllowsColumnReorder="False">
                    <GridViewColumn Header="Name" Width="430">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Path=Name}" TextAlignment="Left" TextTrimming="CharacterEllipsis">
                                    <TextBlock.ToolTip>
                                        <TextBlock Text="{Binding Path=Name}"/>
                                    </TextBlock.ToolTip>
                                </TextBlock>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn Header="Hosting" Width="130">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Path=Hosting}" TextAlignment="Center"/>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn Header="Size" Width="100">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Path=Size}" TextAlignment="Right"/>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                </GridView>
            </ListView.View>
        </ListView>
    </Grid>
</UserControl>
